package cn.xval.ft.core.marketdata.manage;

import lombok.Getter;

public enum SpiStatus {
    ready("初始化"),
    connecting("正在建立链接"),
    login("正在登录"),
    loginOk(true,"登录成功"),
    loginFailedByLogic("登录失败(由服务端告知)"),
    loginFailedByNet("登录失败(服务端未反馈错误信息)"),
    subscribe(true,"订阅"),
    subscribeOk(true,"订阅成功"),
    subscribeFailedByLogic(true,"订阅失败(由服务端告知)"),
    subscribeFailedByNet(true,"订阅失败(服务端未反馈错误信息)")
    ;
    @Getter
    private final String text;
    @Getter
    private final boolean active;

    SpiStatus(boolean active, String text) {
        this.active = active;
        this.text = text;
    }

    SpiStatus(String text) {
        this.active = false;
        this.text = text;
    }
}
